<template>
  <div id="roles">
    <breadcrumb 
    :mannage="mannage"
    :List="List"
    />
    <el-card>
      <el-button type="primary">添加角色</el-button>
    </el-card>
    <el-table border :data="RolesList">
      <!-- <el-table-column type="expand"></el-table-column> -->
      <el-table-column type="index" align="center"></el-table-column>
      <el-table-column label="角色名称" prop="roleName" align="center"></el-table-column>
      <el-table-column label="角色名称" prop="roleDesc" align="center"></el-table-column>
      <el-table-column label="操作" align="center">
        <template v-slot:default="scope">
          <el-button type="primary" icon="el-icon-edit" circle></el-button>
          <el-button type="success" icon="el-icon-delete" circle></el-button>
          <el-button type="info" icon="el-icon-setting" circle></el-button>
        </template>
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import Breadcrumb from '@/components/Breadcrumb/Breadcrumb'
import {getRoles} from '@/api/power.js'
export default {
  data(){
    return {
      mannage: '权限管理',
      List:'角色列表',
      RolesList:[]
    }
  },
  components:{
    Breadcrumb
  },
  created(){
    this.getRolesList()
  },
  methods:{
    async getRolesList() {
      const {data: res} = await getRoles()
      this.RolesList = res.data
      console.log(res);
    }
  }
}
</script>

<style>

</style>